<?php
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
$this->pageTitle = 'Cập nhật Form danh sách nhà thầu tham gia đấu thầu'
?>
<div class="span10">
    <h1 class="page-header">Bảng giá</h1>
    <?php if (Yii::app()->user->hasFlash('error')): ?>
        <div class="alert alert-error fade in">
            <button data-dismiss="alert" class="close" type="button">×</button>
            <?php echo Yii::app()->user->getFlash('error') ?>
        </div>
    <?php endif; ?>
    <?php if (Yii::app()->user->hasFlash('success')): ?>
        <div class="alert alert-success fade in">
            <button data-dismiss="alert" class="close" type="button">×</button>
            <?php echo Yii::app()->user->getFlash('success') ?>
        </div>
    <?php endif; ?>
    <div>
        <form method="POST">
            <table class="table table-bordered">
                <tr>
                    <th>Form</th>
                    <th>Giá tiền</th>
                </tr>
                <?php
                foreach ($model as $row) :
                    $price = $row['value'];
                    $path = $row['path'];
                    $form_name = FormData::getFormByPricePath($row['path']);
                    ?>
                    <tr>
                        <td><?php echo $form_name; ?></td>
                        <td><input name="Form_price[<?php echo $path ?>]" type="text" value="<?php echo $price; ?>"/></td>
                    </tr>

                <?php endforeach; ?>
            </table>
            <div class="form-actions">
                <button id="save-category" type="submit" class="btn btn-primary">Lưu</button>
            </div>
        </form>
    </div>
</div>
